home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / SLIDEWIN.C < prev    next >
Text File  |  1989-06-12  |  1KB  |  38 lines

  1. SlideWindow v1.0  Copyright 1989 by Josh Pritikin - Tetrahedron Programming.
  2.  
  3. This code may be used in any program only if there is a reference to Josh Pritikin
  4. in the source code, as shown below.
  5.  
  6. SlideWindow(window, behind)        /* thanx to Josh Pritikin */
  7. WindowPeek    window, behind;
  8. {
  9.     RgnHandle    clobberVis, structure;
  10.     Point        gloff;
  11.     
  12.     clobberVis = NewRgn(); structure = NewRgn();
  13.     
  14.     CopyRgn(window->port.visRgn, clobberVis);
  15.     
  16.     SendBehind(window, behind);
  17.     CalcVis(window);
  18.     
  19.     DiffRgn(window->port.visRgn, clobberVis, clobberVis);
  20.     DiffRgn(window->strucRgn, window->contRgn, structure);    /* already global */
  21.     
  22.     SetPort(window);
  23.     gloff.h = 0; gloff.v = 0;
  24.     LocalToGlobal(&gloff);
  25.     OffsetRgn(clobberVis, gloff.h, gloff.v);
  26.     UnionRgn(clobberVis, structure, clobberVis);
  27.     
  28.     PaintOne(window, clobberVis);
  29.     
  30.     DisposeRgn(clobberVis); DisposeRgn(structure);
  31.     SetPort(behind);
  32. }
  33.  
  34. I may be reached for pats on the back, suggestions, incompatiblities, death
  35. threats, etc. at these fine BBS's:
  36.  
  37. GEnie: J.Pritikin                                  Digital Dungeon (805) 969-9330: Razor
  38.